-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 10 pull requests #106637
Rollup of 10 pull requests #106637
Conversation
If we have a call such as `foo(&mut buf)` and after reference collapsing the type is inferred as `&T` where-as the required type is `&mut T`, don't suggest `foo(&mut mut buf)`. This is wrong syntactically and the issue lies elsewhere, not in the borrow. Fixes rust-lang#105645
A number of tests under ui/const-ptr and ui/consts are currently failing on big-endian platforms as the binary encoding of some constants is hard-coded in the stderr test files. Fix this by providing a normalize-stderr-test rule that strips out the raw bytes hex dump, so the comparison can be done in an endianness-independent manner. Note that in most cases, this means the tests are now also independent of word size, so the 32bit and 64bit cases can be re-unified. To keep tests that verify the details of those raw bytes dumps, a new test case raw-bytes.rs performs the tests where the hex dumps were stripped out a second time, but only on little- endian platforms. In addition, src/test/ui/const-ptr/forbidden_slices.rs exposes an endian-specific difference in this diagnostic output: constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean depending on which byte of D0 is not a boolean value (0 or 1). Fixed this by choosing a value of D0 that differs from 0 or 1 in all bytes. Fixes part of rust-lang#105383.
…errors_for_expr_obligation
Fuchsia already uses SCS by default for C/C++ code on ARM hardware. This patch allows SCS to be used for Rust code as well.
Instead of just switching to a probe, check for different matches, and see how many there are. If one, unify it, otherwise return true and let it be unified later.
This prevents an ICE due to a value not actually being evaluatable later.
…yUwU Change a commit_if_ok call to probe Removes an over-eager `commit_if_ok` which makes inference worse. I'm not entirely sure whether it's ok to remove the check that types are the same, because casting seems to cause equality checks with incorrect types? Fixes rust-lang#105037 r? ```@BoxyUwU```
Remove invalid case for mutable borrow suggestion If we have a call such as `foo(&mut buf)` and after reference collapsing the type is inferred as `&T` where-as the required type is `&mut T`, don't suggest `foo(&mut mut buf)`. This is wrong syntactically and the issue lies elsewhere, not in the borrow. Fixes rust-lang#105645
…r=oli-obk Fix ui constant tests for big-endian platforms A number of tests under ui/const-ptr and ui/consts are currently failing on big-endian platforms as the binary encoding of some constants is hard-coded in the stderr test files. Fix this by a combination of two types of changes: - Where possible (i.e. where the particular value of a constant does not affect the purpose of the test), choose constant values that have the same encoding on big- and little-endian platforms. - Where this is not possible, provide a normalize-stderr-test rule that transforms the printed big-endian encoding of such constants into the corresponding little-endian form. Fixes part of rust-lang#105383.
Enable Shadow Call Stack for Fuchsia on AArch64 Fuchsia already uses SCS by default for C/C++ code on ARM hardware. This patch allows SCS to be used for Rust code as well.
…, r=oli-obk Move `check_region_obligations_and_report_errors` to `TypeErrCtxt` Makes sense for this function to live with its sibling `resolve_regions_and_report_errors`, around which it's basically just a wrapper.
Fix incorrect suggestion for extra `&` in pattern Closes rust-lang#106182
…r=lcnr Simplify some canonical type alias names * delete the `Canonicalized<'tcx>` type alias in favor for `Canonical<'tcx>` * `CanonicalizedQueryResponse` -> `CanonicalQueryResponse` I don't particularly care about the latter, but it should be consistent. We could alternatively delete the first alias and rename the struct to `Canonicalized`, and then keep the name of `CanonicalizedQueryResponse` untouched.
…=lcnr Use FxIndexSet when updating obligation causes in `adjust_fulfillment_errors_for_expr_obligation` I have no idea how to test this reliably, but I've **manually** verified it fixes the instability in rust-lang#106417 that isn't due to dtolnay/trybuild#212. Fixes rust-lang#106417
…ters-borrowck, r=estebank Use fmt named parameters in rustc_borrowck
…aumeGomez error-code docs improvements (No. 2) - Added empty error-code docs for `E0208`, `E0640` and `E0717` with the "internal" header as discussed on Discord. - Wrote docs and UI test for `E0711`, again with the header. - `tidy` changes are common-sense and make everything pass, `style.rs` hack is annoying though. r? ```@GuillaumeGomez```
@bors r+ rollup=never p=10 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR: previous master: af58fc8699 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (3020239): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesThis benchmark run did not return any relevant results for this metric. |
Successful merges:
check_region_obligations_and_report_errors
toTypeErrCtxt
#106164 (Movecheck_region_obligations_and_report_errors
toTypeErrCtxt
)&
in pattern #106291 (Fix incorrect suggestion for extra&
in pattern)adjust_fulfillment_errors_for_expr_obligation
#106468 (Use FxIndexSet when updating obligation causes inadjust_fulfillment_errors_for_expr_obligation
)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup